﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.master" CodeFile="RubrosAdmin.aspx.cs" Inherits="Stock_RubrosAdmin" %>

<asp:Content ID="Content1"  ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="text-align: center; vertical-align: text-top;">
    
    <h1 style="text-align: left">
            &nbsp;&nbsp;&nbsp; Stock: Rubros</h1>
        <table id="tblAdmin" runat="server" class="tablaForm" style="width: 550px; text-align: center">
            <tr>
                <td align="right" class="tdStock" colspan="3">
                    Administraci&oacute;n de Rubros</td>
            </tr>
            <tr>
                <td align="right" class="tdForm" style="width: 20%">
                    C&oacute;digo:&nbsp;</td>
                <td align="left" class="tdForm" style="width: 80%">
                    <asp:TextBox ID="txtCodigo" runat="server" CssClass="cuadrotxt"></asp:TextBox></td>
            </tr>
            <tr>
                <td align="right" class="tdForm" style="width: 20%; height: 23px">
                    Rubro:&nbsp;</td>
                <td align="left" class="tdForm" style="width: 80%; height: 23px">
                    <asp:TextBox ID="txtRubro" runat="server" CssClass="cuadrotxt100"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tdBotones" colspan="2">
                    <asp:Button ID="btnBuscar" runat="server" OnClick="btnBuscar_Click" Text="Buscar"
                        Width="75px" />
                    <asp:Button ID="btnNuevo" runat="server" OnClick="btnNuevo_Click" Text="Nuevo" Width="75px" />
                    <asp:Button ID="btnCancelar" runat="server" OnClick="btnCancelar_Click" Text="Cancelar"
                        Width="75px" />
                </td>
            </tr>
            <tr>
                <td colspan="3" style="width: 550px">
                    <asp:GridView ID="gvRubros" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                        BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px"
                        CellPadding="3" DataKeyNames="Id_Rubro" GridLines="Vertical" 
                        OnPageIndexChanging="gvRubros_PageIndexChanging"
                        OnSelectedIndexChanged="gvRubros_SelectedIndexChanged"
                        Width="100%">
                        <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                        <Columns>
                            <asp:TemplateField HeaderText="C&#243;digo">
                                <HeaderStyle ForeColor="White" HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:Label ID="Código" runat="server" Text='<%# Bind("Id_Rubro") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Rubro">
                                <HeaderStyle ForeColor="White" HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:Label ID="Titular" runat="server" Text='<%# Bind("Rubro") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField ShowHeader="False">
                                <HeaderStyle ForeColor="White" />
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Select"
                                        Text="Seleccionar"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <RowStyle BackColor="#EEEEEE" ForeColor="Black" HorizontalAlign="Center" />
                        <EditRowStyle Wrap="True" />
                        <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                        <HeaderStyle BackColor="#325FB9" Font-Bold="True" Font-Names="Arial Rounded MT Bold"
                            ForeColor="White" />
                        <AlternatingRowStyle BackColor="Gainsboro" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        <table id="tblGestion" runat="server" class="tablaForm" style="width: 550px">
            <tr>
                <td class="tdTit" colspan="4">
                    Gesti&oacute;n de Rubros</td>
            </tr>
            <tr>
                <td class="tdLiteral" colspan="4" style="text-align: center">
                    <asp:Label ID="lblAccion" runat="server" CssClass="lblAccion">Acci&oacute;n</asp:Label>&nbsp;</td>
            </tr>
            <tr>
                <td class="tdLiteral" style="width: 20%; text-align: right">
                    <asp:Label ID="lblRubro" runat="server" CssClass="label" Text="Rubro:"></asp:Label></td>
                <td class="tdForm" colspan="3" style="width: 80%; text-align: left">
                    <asp:TextBox ID="txtRubro2" runat="server" CssClass="cuadrotxt100" MaxLength="50"></asp:TextBox></td>
            </tr>
            <tr>
                <td class="tdBotones" colspan="4">
                    <asp:Button ID="btnGuardar" runat="server" CssClass="Boton" OnClick="btnGuardar_Click"
                        Text="Guardar" Width="75px" />
                    &nbsp;&nbsp;
                    <asp:Button ID="btnCancelar2" runat="server" CssClass="Boton" OnClick="btnCancelar_Click"
                        Text="Cancelar" Width="75px" />&nbsp;
                </td>
            </tr>
        </table>
    </div>
    <asp:HiddenField ID="hdnAccion" runat="server" />
</asp:Content>
            
